﻿using System;
using System.ServiceModel.Activation;
using System.Web;
using System.Web.Routing;

namespace SIS_Wcf_Server
{
    public class Global : HttpApplication
    {
        void Application_Start(object sender, EventArgs e)
        {
            RegisterRoutes();
            monit.util.logger.LogObjectServer l = monit.util.logger.LogObjectServer.getServer();
            l.CurrentLogger = new monit.util.logger.MemoryLogger(2500);
            l.CurrentLogger.DoLog(l.LogFactory.createLogEntry("System initilized", monit.util.logger.LogSeverity.INFO, "SisServer"));

            SpotFinder.Indexer.Init();

        }

        private void RegisterRoutes()
        {
            // Edit the base address of Service1 by replacing the "Service1" string below
            RouteTable.Routes.Add(new ServiceRoute("", new WebServiceHostFactory(), typeof(SisRestService)));
        }
    }
}
